package com.tchy.cloud.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * xmweilove
 */
@Entity
@Table(name = "c_ques_ques", schema = "", catalog = "")
public class CQuesQuesEntity {
    private Integer id;//主键 ques_ques_id

// private Integer quesId;//量表id  questionnaire_id
    private CQuestionnaireEntity questEntity;

    private String name;//问题名称 name
    private String quesDesc;//问题描述 ques_desc
    private Integer quesType;//1:纯单选 2:纯多选 3:纯回答 4:单选+回答 5:多选+回答 ques_type
    private Integer selectNum;//选择项 select_num
    private Integer quesNo;//题号 question_no
    private Integer effective;//是否有效 effective
    private Integer deleted;//是否删除 deleted
    private Date createTime;//创建时间 create_time


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "ques_ques_id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "questionnaire_id")
    public CQuestionnaireEntity getQuestEntity() {
        return questEntity;
    }

    public void setQuestEntity(CQuestionnaireEntity questEntity) {
        this.questEntity = questEntity;
    }


    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Basic
    @Column(name = "effective")
    public Integer getEffective() {
        return effective;
    }

    public void setEffective(Integer effective) {
        this.effective = effective;
    }

    @Basic
    @Column(name = "deleted")
    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Basic
    @Column(name = "ques_desc")
    public String getQuesDesc() {
        return quesDesc;
    }

    public void setQuesDesc(String quesDesc) {
        this.quesDesc = quesDesc;
    }

    @Basic
    @Column(name = "ques_type")
    public Integer getQuesType() {
        return quesType;
    }

    public void setQuesType(Integer quesType) {
        this.quesType = quesType;
    }

    @Basic
    @Column(name = "select_num")
    public Integer getSelectNum() {
        return selectNum;
    }

    public void setSelectNum(Integer selectNum) {
        this.selectNum = selectNum;
    }


    @Basic
    @Column(name = "question_no")
    public Integer getQuesNo() {
        return quesNo;
    }

    public void setQuesNo(Integer quesNo) {
        this.quesNo = quesNo;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
